#!/bin/bash
#终端输出进度条
while true;do
  for number in {1..20000};do
    color_old=$(( RANDOM % 7 + 1 ))
    color_new="3${color_old}m"
    echo -e "\e[${color_new}`yes ">" | head -${number} | tr -d "\n"` \e[0m"
    time=$(( RANDOM % 9  ))
    time_sleep="0.${time}"
    sleep ${time_sleep}
    done
done
